
#ifndef __TARGETTRACKING_BASTATION_H_
#define __TARGETTRACKING_BASTATION_H_

#include <omnetpp.h>
#include "RoutingDef.h"
#include "Matrix.h"

class Bastation : public cSimpleModule
{
    public:
        int numberNodes;
        double xpos, ypos;
        double X_MAX, Y_MAX;
        double trRange;
        int frameNumber;
        Matrix tarPos_meas[2000];
        Matrix tarPos_true[2000];
        int numPos;
        bool o1;
        double noise[10000];
        int countNoise;
        simtime_t t_start;
        simtime_t t_end_tracking;
        simtime_t t_end_routing;
        int typeEstimate;
        int typeProtocol;

        virtual void initialize();
        virtual void handleMessage(cMessage *msg);
        virtual void finish();
        void initLinks();
        //void sendSeflMessage(const char *name, int kind, double time);
        double distanceCal(double x, double y);
        bool testAlive();
        double createNoise();
        void storeValue(double value, const char *fileName);
};

#endif
